import request from '@/utils/request'

// 查询班级信息列表
export function findPageList(query) {
  return request({
    url: '/basedata/bDevice/findPageList',
    method: 'post',
    data: query
  })
}

export function addOrUpdate(data) {
  return request({
    url: '/basedata/bDevice/addOrUpdate',
    method: 'post',
    data: data
  })
}

export function findById(id) {
  return request({
    url: '/basedata/bDevice/findById/' + id,
    method: 'get',
  })
}

export function bindClass(data) {
  return request({
    url: '/basedata/bDevice/bindClass',
    method: 'post',
    data: data
  })
}

export function unbindClass(deviceId) {
  return request({
    url: '/basedata/bDevice/unbindClass/' + deviceId,
    method: 'get',
  })
}

export function bindDor(data) {
  return request({
    url: '/basedata/bDevice/bindDor',
    method: 'post',
    data: data
  })
}

export function unbindDor(deviceId) {
  return request({
    url: '/basedata/bDevice/unbindDor/' + deviceId,
    method: 'get',
  })
}

export function deleteDevice(data) {
  return request({
    url: '/basedata/bDevice/delete',
    method: 'post',
    data: data
  })
}